package SinUso;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import algocity.modelo.ModeloObservable;

public class ControladorBotones implements ActionListener {
	
	ModeloObservable modelo;
		
	public ControladorBotones(ModeloObservable modelo) {
		this.modelo = modelo;
	}
	
	public void actionPerformed(ActionEvent e) {
		System.out.println("Boton: " + e.getActionCommand() + ".");
		try {
			modelo.selectEdificio((String)e.getActionCommand());
		} catch (Exception e1) {
			System.out.println("No se reconoce boton.");
			// TODO Auto-generated catch block
			e1.printStackTrace();
		}
	}

}
